package cn.wolfcode._IOday01_.work03;

import java.io.UnsupportedEncodingException;

public class Decode {
    public static void main(String[] args) throws UnsupportedEncodingException {
        //乱码
        String str = "好好学习,天天向上" ;
        byte[] bytes = str.getBytes("ISO-8859-1");
        String str1 = new String(bytes,"ISO-8859-1");
        System.out.println(str1);
        //UTF-8
        byte[] bytes1 = str.getBytes("UTF-8");
        String str2 = new String(bytes1,"UTF-8");
        System.out.println(str2);
    }
}
